package com.learning.dubbo.protocol.http.provider;

import com.learning.dubbo.protocol.http.api.GreetingsService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Value;

/**
 * ClassName: Consumer
 * Description: 消费客户端
 * Date: 2020/6/15 13:43 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@DubboService
public class GreetingsServiceImpl implements GreetingsService {

    @Value("${dubbo.application.name}")
    private String serviceName;

    @Override
    public String sayHi(String name) {

        return String.format("[%s] : Hello, %s", serviceName, name);
    }
}